package main

import (
	"fmt"
	mongo "g-mongo-tool"
)

func main() {

	ip, port, adminUser, adminPwd, user, pwd, db, role := mongo.CommandArgs()
	fmt.Println("开始创建数据库用户")
	uri := fmt.Sprintf("mongodb://%s:%s@%s:%d", adminUser, adminPwd, ip, port)
	mongo.InsertUser(uri, user, pwd, db, role)
}
